<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<link rel="stylesheet" href="script/multiSelect/css/multi-select-metro.css" />
<link type="text/css" rel="stylesheet" href="media/css/rms-data-supervision.css" />
<link type="text/css" rel="stylesheet" href="pages/basic/css/customFactoryMng.css" />
<style type="text/css">
	#add-factory{
		height:480px;
		width: 800px;
		margin-left: -400px;
	}
</style>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			<ul class="breadcrumb">
				<li>
					<span class="c-999">客户管理</span> 
					<i class="icon-angle-right"></i>
				</li>
				<li><a class="c-666" onclick="util.showContent('pages/basic/customFactoryMng.jsp')">厂区管理</a></li>
			</ul>
		</div>
	</div>

	<!--搜索框 str-->
	<div class="search-box">
		<div class="search-title">
			<span class="search-criteria c-666">&nbsp;查询条件</span>
		</div>
		<table class="search-body" border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td>
					<label class="my-label">所属客户:</label>
					<input class="my-input" type="text" name="query_customName" id="query_customName" />
					<label class="my-label">厂区名称:</label>
					<input class="my-input" type="text" name="query_facName" id="query_facName" />
				</td>
			</tr>
		</table>
	    <ul class="search-button">
			<li>
				<button class="btn blue" id="btn_query">查&nbsp;&nbsp;询</button>
			</li>
			<li>
				<button class="btn blue" id="btn_reset">重&nbsp;&nbsp;置</button>
			</li>
	   </ul>
	</div>
	<!--搜索框 end-->
	
	<div class="table-con">
		<div class="table-head">
			&nbsp;&nbsp;&nbsp;<i class="icon-reorder"></i>&nbsp;列表详情
		</div>
		<div class="list-body">
			<div class="portlet-body">
				<p>            
					<button type="button" class="btn blue hide" data-toggle="modal" id="factory_table_add">新&nbsp;&nbsp;增</button>         
					<button type="button" class="btn green hide" data-toggle="modal" id="factory_table_edit">编&nbsp;&nbsp;辑</button>
					<button type="button" class="btn red hide" data-toggle="modal" id="factory_table_del">删&nbsp;&nbsp;除</button>
					<button type="button" class="btn blue hide" data-toggle="modal" id="factory_table_tbatteryCorrelation">电池关联管理</button>
				</p>
			</div>
			<div class="table-responsive">
				<table class="table table-bordered table-striped table-hover" id="factory_table">
					<thead>
						<tr>
							<th class="sorting_asc_disabled" style="width:8px;">
								<input type="checkbox" class="group-checkable" data-set="#factory_table .checkboxes" />
							</th>
							<th class="fourMinWidth">所属客户</th>
							<th class="fourMinWidth">上级单位</th>
							<th class="fourMinWidth" width="50%">厂区名称</th>
							<th class="twoMinWidth">地区</th>
							<th class="fourMinWidth">电池数量</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	
	<!-- 模态窗口 str -->
	<jsp:include page="/pages/common/modal.jsp"></jsp:include>
	<!-- 新增厂区 -->
	<div id="add-factory" class="modal hide fade _hidden_bs_modal" data-focus-on="input:first" >
		<div class="modal-header add-factory-header bg-green c-bold c-fff" id="addFactory_title">
			新增厂区
		</div>
		<div class="modal-body add-factory-body">
			<form id="factory_form">
				<input name="pkId" id="pkId" class="hide" value=""/>
				<input name="parentCusId" id="parentCusId" class="hide" value=""/>
				<table class="table">
					<tr>
						<td>
							<span class="al-right"><i class="c-red">*&nbsp;</i>所属客户：</span><select id="customId" name="customId">
								<option value=""></option>
							</select>
						</td>
						
					</tr>
					<tr>
						<td>
							<span class="al-right">上级单位：</span><input type="text" name="parentCusName" id="parentCusName" maxlength="300"/>
						</td>
					</tr>
					<tr>
						<td>
							<span class="al-right"><i class="c-red">*&nbsp;</i>厂区名称：</span><input type="text" name="facName" id="facName" maxlength="300"/>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<span class="al-right"><i class="c-red">*&nbsp;</i>所属地：</span><div id="cityDiv" style="display:inline;">
								<select class="prov zoneSelect" name="province" id="province"></select>  
							    <select class="city zoneSelect" disabled="disabled" name="city" id="city"></select> 
							    <select class="dist zoneSelect" disabled="disabled" name="area" id="area"></select> 
							</div>
						</td>
					</tr>
					<tr>
						<td colspan="2"><span class="al-right">&nbsp;详细地址：</span><input type="text" name="address" id="address" style="width: 476px;" maxlength="80"/></td>
					</tr>
					<tr>
						<td><span class="al-right">&nbsp;邮编：</span>
						<input type="text" name="zipCode" id="zipCode" maxlength="6"/></td>
						
					</tr>
				</table>
			</form>
		</div>
		<div class="modal-footer al-center bg-fff">
			<button type="button" data-dismiss="modal" class="btn green" style="margin-right: 25px;" id="form_factory_save">保存</button>
			<button type="button" data-dismiss="modal" class="btn red" id="form_btn_close">取消</button>
		</div>
	</div>
	
	<!-- 厂区详情 -->
	<div id="detail-factory" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
		<div class="modal-header add-factory-header bg-green c-bold c-fff">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
			厂区详情
		</div>
		<div class="modal-body add-factory-body">
			<table class="table">
				<tr>
					<td class="my-td">
						<span class="al-right">所属客户：</span>
						<span class="my-text" id="detail_customName"></span>
					</td>
					<td class="my-td">
						<span class="al-right">厂区名称：</span>
						<span class="my-text text-of" id="detail_facName"></span>
					</td>
				</tr>
				<tr>
					<td class="my-td">
						<span class="al-right">所属省份：</span>
						<span class="my-text" id="detail_province"></span>
					</td>
					<td class="my-td">
						<span class="al-right">所属市区：</span>
						<span class="my-text" id="detail_city"></span>
					</td>
				</tr>
				<tr>
					<td class="my-td">
						<span class="al-right">所属地域：</span>
						<span class="my-text" id="detail_area"></span>
					</td>
					<td class="my-td">
						<span class="al-right">邮编：</span>
						<span class="my-text" id="detail_zipCode"></span>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="my-td">
						<span class="al-right">详细地址：</span>
						<span class="my-text-579 text-of" id="detail_address"></span>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<!--厂区电池管理------------>
	<div id="batteryID-correlation" class="modal hide fade" tabindex="-1" data-focus-on="input:first">
		<div class="modal-header add-customer-header bg-green c-bold c-fff">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
			厂区电池管理
		</div>
		<div class="modal-body">
			<input id="batteryCorrelation_pkId" value="" class="hide" />
			<input id="batteryCorrelation_customId" value="" class="hide" />
			<!-- <div style="border: solid 1px green"><span class="my-span-70">客户：</span><span class="text-of my-span" id="batteryCorrelation_custom"></span></div>
			<div style="border: solid 1px green"><span class="my-span-70">已经关联的电池：</span><span class="text-of my-span" id="batteryCorrelation_packNum"></span>个</div> -->
			<table border="0" style="margin-bottom: 10px;">
				<tr>
					<td><span class="my-span-70">客户：</span></td>
					<td class="al-left"><span class="text-of my-span" id="batteryCorrelation_custom"></span></td>
				</tr>
				<tr>
					<td class="al-left" colspan="2" style="font-family: 宋体;color: #666;font-size: 14px;">已经关联的电池&nbsp;<span id="batteryCorrelation_packNum"></span>&nbsp;个</td>
				</tr>
			</table>
			<div class="portlet-body form">
				<form action="#" class="form-horizontal">
					<div class="control-group">
						<div class="controls" id="multiSelect_controls">
						</div>
					</div>
				</form>
			</div>

		</div>
		<div class="modal-footer al-center bg-fff">
			<button type="button" data-dismiss="modal" class="btn green" style="margin-right: 25px;" id="batteryCorrelation_save">确定</button>
			<button type="button" data-dismiss="modal" class="btn red" id="batteryCorrelation_close">取消</button>
		</div>
	</div>	
	<!-- 模态窗口 end -->
</div>
<script type="text/javascript" src="script/multiSelect/js/jquery.multi-select.js"></script>
<script type="text/javascript" src="script/jquery/js/jquery.quicksearch.js"></script>
<script type="text/javascript" src="pages/basic/js/customFactoryMng.js"></script>
<script type="text/javascript" src="script/jquery/js/jquery.cityselect.js"></script>
<script src="media/js/ui-modals.js"></script>

<script type="text/javascript">
	jQuery(document).ready(function() {
		factoryTable.init();
		UIModals.init();
	});
</script>

